package com.yc.navy.goods.config;

import java.io.FileWriter;

import java.io.IOException;

public class AlipayConfig {
	// 应用ID，您的APPID,收款账号既是您的APPID对应支付宝账号
	public static String app_id = "9021000123612067";

	// 商户私钥,您的PKCS8格式RSA2私钥
	public static String merchant_private_key = "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCWNGi1jOCf8FDpfQ67RwZVozb0UiX7EsAeFh6EgAwH9I2fzaMfPm+0ge91Sz9ca+itquTJqu0aUap5a8eIP9pSzFGAo1ro7kUeOSjQwGC/usXRlB4pH304DHYXaBoECbfNd2wZLrxaQdJ3c6rXdV+UCMZ7T2myLzMvldHe/Fy7OobgB+KrQ695S42Tw53sYjNZPaNJY3NNZ/rwQZ3xtbwtcvP8V7woJ/+GZ8puOnMvcIXjdgqkdBRGr0Om75PeszWhGwAdIP5RP+l2qfTM5ewssyYvSxv7lT+G31io3u4RfUBZloStcfyfB1jf0ZC67N/vGwJLTlGP8nCZpJcB+KTzAgMBAAECggEBAJS2cu08+7CeiB2EGa/F1Dm5jNE8/CmnGNsw3yokdMTzlbygJl7qvEIlW2XwCF2C4S4AwuAAARxLutLYqQb24TuU2yTXl0yDi58uzIBR1/g7/VtQoMPqT1nMzKbEBO32iSo+kKImKYnbHXvy4zTLGsRAI/M2Xtlx7eWxGccCaPVcoj6n6GscPemnUKkVFa3RYsD4GK0UagRs/qetm6E98OrqM7A3Ilhvgn5LVb0HKFvf6rMY91yMOAFs3HvnwDz8E55LNfA2VKtCRr40v92Uu0gWagRWDrUMOl3+1H90HswCiYRMIprSFtVaqo8JYQHUDihWhC0yhmpYxR103GCrp/ECgYEA8UBuc3w13xJ0TelYR+8FGu2PhA3/1fQvhKJoplU94n6RqqI2JJE5snVUVon7tggPkE4rqPJvIwNHtX1aWYYWZmPursup+YxRe4UFPCG2HPa2Xz8dBF3tV3LHgKSDmr7RiS6KYAtuRL9mJxHLCqomWkxhZIKYlUWrI9aZpYKjcT8CgYEAn2MZq7W3ER9GT1fT4q+y1YuGIAg+qm+cTLeVLCsQVrNzxrH3yuWiRxwlvEeuURHqL28p6MmDAs5NW7zIvwK4aLZ7gCLqj0D2aDKSFUX8QXM6k790TNWtNiIOGMZ/pUqqDWs1ZnxDK1NTdIGuvyaCpU6/uMWE7sOQEAyp5UC2K00CgYBzsAUHJiIjNZNGJUarQAg/sHmoxpnPPIho3wS19px1d2Jc4+p4wJddZ3wo/4QP92+XMJUpMBBxRsplUpY35d/p+7PiaFG7FDmitNgczMGqw/gSVo6QoIYG8EiQ/NMLKsQKN6Itim23U90lkRe/pnY7yPLPIv0OX9lAl1EYmDvOOwKBgFc1D8ylpj6WEBBFi8dSPtUcfAx2tmLmomxPXi1GerAVi9lBcsTvE/U4b2UvCy+MT8gYWKPn7ejRG/5/so7gXCne/n/Dmvc6ohes48UD/9uHwpsoe+e2WgluZKwln52+1oB1Eki64L2J3/W1JvmrhnwQNFJSsEM7eU1uwF6RI5tZAoGBAJHXjFutIhGnWc7GMouePIdNT5yn5s+v49JErFtFYOOHmM0B+a5h6j2qDe54FwPEvcE6lI2/ok1/FonO/O6BtuBjSudJ37EIrYzYjjrbdK2aC+BoEvEQOqUBw70r6w3+QiGX34SA8oBDpBqJqhKffkg3RkR2vognll+GmF5oPdNn";

	// 支付宝公钥,查看地址：https://openhome.alipay.com/platform/keyManage.htm 对应APPID下的支付宝公钥。
	public static String alipay_public_key = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwu8w3vIBkd/t4Mjpowb/G2zCNwTV76AeZ0SvNYQIgUBM/cYtktAP4j1xe2I7PRCSl7IlH2wfUpSpp4KjwwFtuGIvgRLnkcepXVp43oXcEaK7q7fpQFIo3L4Kf3uwBILvL3TNcWtT8WFd5VzKLohGPUsrWRGEjQErkSudcfIUsmKLKvX3oUDewHByJ9zwVIpYq1d/xpkNfLyN4Y0+wgEVpXd15FOkakx/+QF/7YPjO55dp/gdjzakyu/zxL28siqVidGqcMAEuRif608W5nyRk5kC7+RQDlD82Jyku2leJeouEZbiXKszoxa1N/ZCUuAVrZePod1KRVeE6zWPZzxuZwIDAQAB";

	// 服务器异步通知页面路径  需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
	public static String notify_url = "http://127.0.0.1:6700/pay/alipay/notify_url";

	// 页面跳转同步通知页面路径 需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
	//public static String return_url = "http://127.0.0.1:8080/snacknet/return_url.jsp";
	public static String return_url = "http://127.0.0.1:6100/pay/alipay/return_url";

	// 签名方式
	public static String sign_type = "RSA2";

	// 字符编码格式
	public static String charset = "utf-8";

	// 支付宝网关
	public static String gatewayUrl = "https://openapi-sandbox.dl.alipaydev.com/gateway.do";

	// 支付宝网关
	public static String log_path = "C:\\";
	// public static String log_path = "/";

	/** 
	 * 写日志，方便测试（看网站需求，也可以改成把记录存入数据库）
	 * @param sWord 要写入日志里的文本内容
	 */
	public static void logResult(String sWord) {
		FileWriter writer = null;
		try {
			writer = new FileWriter(log_path + "alipay_log_" + System.currentTimeMillis()+".txt");
			writer.write(sWord);
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			if (writer != null) {
				try {
					writer.close();
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
		}
	}
}